import { useState, useEffect } from 'react'
import BusinessMap from '../../../../common/BusinessMap';

import { Route, Switch, Redirect, useLocation, useHistory } from "react-router-dom";
import LayerManager from './LayerManager';
import Detail from './Detail';
import Toolbar from './Toolbar';
import HaiNengDa from './HaiNengDa';
import { Button, Modal } from 'antd';

export default function Yzt(props) {
    const [isOpen, setIsOpen] = useState(false)
    return <>
        <BusinessMap >
            <LayerManager />
            <Detail />
            <Toolbar />
            <div style={{ position: 'absolute', top: 30, left: 380, zIndex: 100, }}>

                <Button style={{}} onClick={() => { setIsOpen(!isOpen) }}>海能达</Button>&nbsp;&nbsp;&nbsp;

                {/* {isOpen&&<HaiNengDa/>} */}
            </div>
            <Modal open={isOpen} onCancel={()=>{setIsOpen(!isOpen)}} width='60vw' footer=''mask={false}>
                <iframe
                    src='https://175.154.12.49:9876/'
                    style={{width: '100%', height: '60vh',borderRadius:'10px', border: '2px solid blue' ,marginTop:20}}
                    title='海能达内容'
                />
            </Modal>
        </BusinessMap>
    </>;
}